package test.com.flexoop.utilities.dateutils {

	import com.flexoop.utilities.dateutils.DateUtils;
	
	import org.flexunit.Assert;

	public class WeekOfYearTest {

		public function WeekOfYearTest() {
		}
		
		[Test]
		public function testWeekOfYear():void {
			Assert.assertEquals( 35, DateUtils.weekOfYear( new Date( 2009, DateUtils.monthAsNumber( DateUtils.AUGUST ), 25 ) ) );
			Assert.assertEquals( 1, DateUtils.weekOfYear( new Date( 2009, DateUtils.monthAsNumber( DateUtils.JANUARY ), 1 ) ) );
			Assert.assertEquals( 1, DateUtils.weekOfYear( new Date( 2008, DateUtils.monthAsNumber( DateUtils.DECEMBER ), 29 ) ) );
			Assert.assertEquals( 52, DateUtils.weekOfYear( new Date( 2008, DateUtils.monthAsNumber( DateUtils.DECEMBER ), 28 ) ) );
			Assert.assertEquals( 53, DateUtils.weekOfYear( new Date( 1999, DateUtils.monthAsNumber( DateUtils.JANUARY ), 1 ) ) );
			Assert.assertEquals( 1, DateUtils.weekOfYear( new Date( 1999, DateUtils.monthAsNumber( DateUtils.JANUARY ), 4 ) ) );
		}

	}
}